<template>
    <div id="app">
        <div>
            <!-- <a href=""></a> -->
            <!-- <router-link to="/home">首页</router-link>｜
            <router-link to="/about">关于</router-link> -->
            <button @click="toPage('/home')">首页</button>
            <button @click="toPage('/get')">传值给的页面</button>
            <!-- <button @click="toPage('/about')">关于</button> -->
            <button @click="toPage('/msg')">传值接收的页面</button>
        </div>
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    name: 'App',
    components: {},
    methods: {
        // // 跳转首页
        // toHome() {
        //     this.$router.push('/home');
        // },
        // toAbout() {
        //     this.$router.push('/about');
        // }
        toPage(val) {
            this.$router.push(val);
        }
    }
};
</script>

<style lang="scss">
#app {
    font-family: Avenir, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: center;
    color: #2c3e50;
    margin-top: 60px;
}
.active {
    color: red;
}
</style>
